package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HospitalCaseDMapper;
import com.ruoyi.system.domain.HospitalCaseD;
import com.ruoyi.system.service.IHospitalCaseDService;

/**
 * 病例配送须知Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-13
 */
@Service
public class HospitalCaseDServiceImpl implements IHospitalCaseDService 
{
    @Autowired
    private HospitalCaseDMapper hospitalCaseDMapper;

    /**
     * 查询病例配送须知
     * 
     * @param id 病例配送须知主键
     * @return 病例配送须知
     */
    @Override
    public HospitalCaseD selectHospitalCaseDById(Long id)
    {
        return hospitalCaseDMapper.selectHospitalCaseDById(id);
    }

    /**
     * 查询病例配送须知列表
     * 
     * @param hospitalCaseD 病例配送须知
     * @return 病例配送须知
     */
    @Override
    public List<HospitalCaseD> selectHospitalCaseDList(HospitalCaseD hospitalCaseD)
    {
        return hospitalCaseDMapper.selectHospitalCaseDList(hospitalCaseD);
    }

    /**
     * 新增病例配送须知
     * 
     * @param hospitalCaseD 病例配送须知
     * @return 结果
     */
    @Override
    public int insertHospitalCaseD(HospitalCaseD hospitalCaseD)
    {
        hospitalCaseD.setCreateTime(DateUtils.getNowDate());
        return hospitalCaseDMapper.insertHospitalCaseD(hospitalCaseD);
    }

    /**
     * 修改病例配送须知
     * 
     * @param hospitalCaseD 病例配送须知
     * @return 结果
     */
    @Override
    public int updateHospitalCaseD(HospitalCaseD hospitalCaseD)
    {
        hospitalCaseD.setUpdateTime(DateUtils.getNowDate());
        return hospitalCaseDMapper.updateHospitalCaseD(hospitalCaseD);
    }

    /**
     * 批量删除病例配送须知
     * 
     * @param ids 需要删除的病例配送须知主键
     * @return 结果
     */
    @Override
    public int deleteHospitalCaseDByIds(Long[] ids)
    {
        return hospitalCaseDMapper.deleteHospitalCaseDByIds(ids);
    }

    /**
     * 删除病例配送须知信息
     * 
     * @param id 病例配送须知主键
     * @return 结果
     */
    @Override
    public int deleteHospitalCaseDById(Long id)
    {
        return hospitalCaseDMapper.deleteHospitalCaseDById(id);
    }
}
